package com.yan.demo;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class Demo3 {
    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();
        System.out.println(now);
        System.out.println(now.getDayOfMonth());
        System.out.println(now.getMonthValue());
        System.out.println(now.getDayOfYear());
        LocalDateTime dateTime = LocalDateTime.of(2000 , 12,12,2,12);
        System.out.println(dateTime);
        String format = dateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日"));
        System.out.println("format = " + format);
    }
}
